package com.pty.demo.structural.adapter.object;

import com.pty.demo.structural.adapter.LightingTarget;
import com.pty.demo.structural.adapter.TypeCPowerBankAdaptee;

/**
 * @author pengty
 * @date 2020/3/12
 */
public class ObjectLightingAdapter implements LightingTarget {

    private TypeCPowerBankAdaptee typeCPowerBankAdaptee;

    public ObjectLightingAdapter(TypeCPowerBankAdaptee typeCPowerBankAdaptee) {
        this.typeCPowerBankAdaptee = typeCPowerBankAdaptee;
    }

    @Override
    public void lightingRecharge() {
        System.out.println("使用对象适配器 完成 typeC 适配 Lighting");
        typeCPowerBankAdaptee.typeCRecharge();
    }
}
